package io.gitee.baicaixiaozhan.httpmessagewrapper;

import io.gitee.baicaixiaozhan.httpmessagewrapper.interceptor.ServletResponseResultKitInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * DESC:
 *
 * @author baicaixiaozhan
 * @since v1.0.0
 */
@Import(value = UnifiedResultsWrapperAdvice.class)
@Configuration(proxyBeanMethods = false)
public class UnifiedResultConfiguration implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new ServletResponseResultKitInterceptor());
    }

}
